For symbol construction three internal macros had to be defined.
The first, \@APLmath
, puts a math symbol into a boxed
math environment and adjusts spacing. The second, \@APLmraise
,
puts a math symbol into a raised and boxed math environment and
adjusts spacing. The third, \@APLovly
, simulates backspacing
and overstriking on a typewriter by overlaying two boxes. The
quad symbol required special construction in order to
generate readable compound symbols such as , ,
.
Full reconstruction was needed only for the APL symbol which is a quad symbol with a short vertical rule. The
first version of this symbol used a single quote instead
of the vertical rule and looked rather awkward.
One disadvantage of our solution is high TEX memory consumption.
We have used \let
commands wherever possible in order to
cut down memory usage.
Typesetting APL symbols for this text has cost us approximately
6,800 words of TEX memory. Typesetting the workspace of
the APL front end (32 functions, 11 variables, 23 pages)
has cost a total of 72,800 words
of TEX memory with 29,000 words used for the APL symbols.
We recommend TEX with 262,141 words of memory.
APL lines are sometimes too long to be printed in a single line. When displaying them on the screen, this problem is usually resolved by wrapping them to the next lines without adding any hyphen. Thus, line breaks can occur anywhere in an APL line, in the middle of APL expressions or even in names. As we use one macro for typesetting each APL character, the normal TEX hyphenation algorithm no longer works.
In the definition of each APL symbol which cannot be used in an
identifier the macro \APLgb
is used, which allows breaks with a
penalty of –10. To achieve line breaks in the emergency case the
preprocessor inserts the macro \APLbr
into names longer than 15
characters at regular intervals.
When typesetting APL arrays (cf. Figure ), a fixed spaced font is necessary to preserve its shape. We imitate fixed spaced fonts by simply putting a box of fixed width around all characters.
For typesetting bold APL code the special environment APLbold
is defined. It sets \bf
and \boldmath
and adjusts
the thickness of rules used in symbol construction.